-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
esm: unflag extensionless ES module JavaScript and Wasm in module scope #49974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esm: unflag extensionless ES module JavaScript and Wasm in module scope #49974
Conversation
|
Review requested:
|
LiviaMedeiros
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
|
Maybe add
baking-for-lts
|
That’s a good idea, I assume I should use that without the |
|
@LiviaMedeiros or someone else, do you want to approve this? Then it can land. |
guybedford
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lookup logic all looks correct to me.
|
Landed in 9c68320 |
Following up from #49869, this PR allows extensionless ESM JavaScript and Wasm files within
"type": "module"package scopes to run as entry points or be imported. This can be done as a semver-minor change because currently such files error when they are within amodulescope. (Outside of such a scope, they are interpreted as CommonJS modules unless--experimental-default-type=moduleis passed.)This was discussed in the most recent TSC meeting, nodejs/TSC#1442. At that meeting it was agreed that this change could go out in 21.0.0, but not immediately in 20.x or below. It doesn’t need to be restricted from 20.x indefinitely, but there was a request to hold off on backporting it to 20.x until it had been public in 21.x for a bit. I’ve added labels accordingly.
@nodejs/loaders @nodejs/wasi